﻿/*using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.FileProviders;

var builder = WebApplication.CreateBuilder(args);
// 注册 OracleDbContext
builder.Services.AddDbContext<OracleDBContext>(options =>
    options.UseOracle(builder.Configuration.GetConnectionString("OracleDBContext")));

builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

builder.Logging.AddLog4Net("configFile/log4net.Config");



var app = builder.Build();

app.MapGet("getRequest", () =>
{
    return "ok_get";
});
app.MapPost("postRequest", () =>
{
    return "ok_post";
});
app.MapDelete("deleteRequest", () =>
{
    return "ok_delete";
});


//配置中间件
if (app.Environment.IsDevelopment())
{
    app.UseSwagger();
    app.UseSwaggerUI();
}
var currentPath = builder.Environment.ContentRootPath;
app.UseStaticFiles(new StaticFileOptions()
{
    FileProvider = new PhysicalFileProvider(
           Path.Combine(currentPath, "wwwroot\\images")),
    RequestPath = "/StaticFiles"
});

app.Logger.LogInformation("测试日志生成");
app.Run();
*/



/*//用于初始化应用程序配置的核心方法。它创建一个 WebApplicationBuilder 实例
using SMS.Interface;
using SMS.Services;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddScoped<IUserService, UserService>();


var app = builder.Build();
app.MapGet("/",
    () =>
    {
        return "ok";
    });

app.MapGet("/GetName",
    (IUserService user) =>
    {
        return user.GetName();
    });

app.UseSwagger().UseSwaggerUI();
app.Run();*/



/*var builder = WebApplication.CreateBuilder();
var app = builder.Build();



app.Run(async (context) =>
{
    await context.Response.WriteAsync("Hello World!\n");
});
app.Run(async context =>
{
    await context.Response.WriteAsync("Two Hello World!\n");
});

app.Run();*/